﻿using System;

public class SensitiveWordFilter
{
    // 敏感词字典
    private static readonly Dictionary<string, string> sensitiveWords = new Dictionary<string, string>
    {
        { "hello world", "wzy" } // 键值对 假定"hello world"是敏感词 ，则"wzy"是替换词
    };

    // 敏感词过滤方法
    private static string _FilterSensitiveWords(string input)
    {
        foreach (var word in sensitiveWords)
        {
            if (input.Contains(word.Key))
            {
                input = input.Replace(word.Key, $"hello {word.Value}");
            }
        }
        return input;
    }

    public static string FilterSensitiveWords(string input) 
    {
        return _FilterSensitiveWords(input); 
    }
 }
public class program
{
    static void Main(string[] args)
    {
        Console.WriteLine("请输入文本：");
        string input = Console.ReadLine();
        string output = SensitiveWordFilter.FilterSensitiveWords(input);
        Console.WriteLine(output);
    }
}